<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<c:set value="${requestScope.response.data.pageInfoUtil }" var="pageInfoUtil"/>
<c:set value="${requestScope.response.data.one }" var="one"/>
<c:set value="${requestScope.commentApiResponse.data.list }" var="commentList"/>
<!DOCTYPE html>
<html lang="en">
	<head>
		<title>商品详情 - 高档茶叶与茶具销售系统</title>
		<%@ include file="/common/include/head_title.jsp"%>
	</head>
	<body>
		<jsp:include page="/IndexHeadServlet">
			<jsp:param value="header" name="method"/>
		</jsp:include>
		<div id="mainBody">
			<div class="container">
				<div class="row">
					<%@ include file="/common/include/leftBar.jsp"%>
					<div class="span9">
						<ul class="breadcrumb">
							<li><a href="${rootPath }/IndexHeadServlet?method=main">首页</a><span class="divider">/</span></li>
							<li><a href="${rootPath }/goodsList.htm">产品列表</a><span class="divider">/</span></li>
							<li class="active">商品详情</li>
						</ul>
						<div class="row">
							<div id="gallery" class="span3">
								<c:choose>
									<c:when test="${one.listImg != null && one.listImg != '' }">
										<a href="${websiteFileUrl}${one.listImg }" target="_blank">
											<img alt="" src="${websiteFileUrl}${one.listImg }" width="270" height="270">
										</a>
									</c:when>
									<c:otherwise>
										<img alt="" src="${rootPath }/img/no_pic.png" width="270" height="270">
									</c:otherwise>
								</c:choose>
								<div id="differentview" class="moreOptopm carousel slide">
									<div class="carousel-inner">
										<%-- <div class="item active">
											<a href="${rootPath}/common/resource/themes/images/products/large/f1.jpg"> <img
												style="width: 29%" src="${rootPath}/common/resource/themes/images/products/large/f1.jpg"
												alt=""></a> <a href="${rootPath}/common/resource/themes/images/products/large/f2.jpg">
												<img style="width: 29%"
												src="${rootPath}/common/resource/themes/images/products/large/f2.jpg" alt="">
											</a> <a href="${rootPath}/common/resource/themes/images/products/large/f3.jpg"> <img
												style="width: 29%" src="${rootPath}/common/resource/themes/images/products/large/f3.jpg"
												alt=""></a>
										</div> --%>
										<%-- <div class="item">
											<a href="${rootPath}/common/resource/themes/images/products/large/f3.jpg"> <img
												style="width: 29%" src="${rootPath}/common/resource/themes/images/products/large/f3.jpg"
												alt=""></a> <a href="${rootPath}/common/resource/themes/images/products/large/f1.jpg">
												<img style="width: 29%"
												src="${rootPath}/common/resource/themes/images/products/large/f1.jpg" alt="">
											</a> <a href="${rootPath}/common/resource/themes/images/products/large/f2.jpg"> <img
												style="width: 29%" src="${rootPath}/common/resource/themes/images/products/large/f2.jpg"
												alt=""></a>
										</div> --%>
									</div>
									<!--  
				  <a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
	              <a class="right carousel-control" href="#myCarousel" data-slide="next">›</a> 
				  -->
								</div>
	
								<!-- <div class="btn-toolbar">
									<div class="btn-group">
										<span class="btn"><i class="icon-envelope"></i></span> <span
											class="btn"><i class="icon-print"></i></span> <span
											class="btn"><i class="icon-zoom-in"></i></span> <span
											class="btn"><i class="icon-star"></i></span> <span class="btn"><i
											class=" icon-thumbs-up"></i></span> <span class="btn"><i
											class="icon-thumbs-down"></i></span>
									</div>
								</div> -->
							</div>
							<div class="span6">
								<h3>${one.title }</h3>
								<!-- <small>- (14MP, 18x Optical Zoom) 3-inch LCD</small> -->
								<hr class="soft">
								<form class="form-horizontal qtyFrm">
									<div class="control-group">
										<label class="control-label"><span>${one.price }</span></label>
										<div class="controls">
											<button type="button" onclick="return addCart('${one.id}','1')"
												class="btn btn-large btn-primary pull-right">
												添加购物车 <i class=" icon-shopping-cart"></i>
											</button>
										</div>
									</div>
								</form>
	
								<hr class="soft">
								<h4>库存:${one.stockNum }&nbsp;销量:${one.saleNum }</h4>
								<!-- <form class="form-horizontal qtyFrm pull-right">
									<div class="control-group">
										<label class="control-label"><span>Color</span></label>
										<div class="controls">
											<select class="span2">
												<option>Black</option>
												<option>Red</option>
												<option>Blue</option>
												<option>Brown</option>
											</select>
										</div>
									</div>
								</form> -->
								<hr class="soft clr">
								<p>${one.brief }</p>
								<a class="btn btn-small pull-right" href="#detail">更多</a>
								<br class="clr">
								<a href="#" name="detail"></a>
								<hr class="soft">
							</div>
	
							<div class="span9">
								<ul id="productDetail" class="nav nav-tabs">
									<li class="active">
										<a href="#home" data-toggle="tab">产品介绍</a>
									</li>
									<li>
										<a href="#profile" data-toggle="tab">评论列表</a>
									</li>
								</ul>
								<div id="myTabContent" class="tab-content">
									<div class="tab-pane fade active in" id="home">
										${one.content }
									</div>
									<div class="tab-pane fade" id="profile">
										<div class="tab-content">
											<div class="tab-pane active" id="listView">
												<c:forEach items="${commentList }" var="listTemp" varStatus="stat">
													<div class="row">
														<%-- <div class="span2">
															<img src="${rootPath}/common/resource/themes/images/products/5.jpg" alt="">
														</div> --%>
														<div class="span9">
															<h3>标题:${listTemp.name }</h3>
															<hr class="soft">
															<h5>评分:${listTemp.score }</h5>
															<p>评论时间:${listTemp.createTime }</p>
															<p>${listTemp.content }</p>
															<!-- <a class="btn btn-small pull-right"
																href="product_details.html">View Details</a> <br
																class="clr"> -->
														</div>
														<!-- <div class="span3 alignR">
															<form class="form-horizontal qtyFrm">
																<h3>$222.00</h3>
																<label class="checkbox"> <input type="checkbox">
																	Adds product to compair
																</label><br>
																<div class="btn-group">
																	<a href="product_details.html"
																		class="btn btn-large btn-primary"> Add to <i
																		class=" icon-shopping-cart"></i></a> <a
																		href="product_details.html" class="btn btn-large"><i
																		class="icon-zoom-in"></i></a>
																</div>
															</form>
														</div> -->
													</div>
													<hr class="soft">
												</c:forEach>
											</div>
										</div>
										<br class="clr">
									</div>
								</div>
							</div>
	
						</div>
					</div>
				</div>
			</div>
		</div>
		<%@ include file="/common/include/head_footer.jsp"%>
	</body>
</html>